#!/usr/bin/python
# -*-coding:UTF-8 -*-

# ========================
# @Time  : 2021/1/21
# @Author: Sunny
# ========================

#命名元组的用法
"""
python数据类型:
数值:int float
序列:list str tuple
散列:set dict

可迭代对象:
"""

from collections import namedtuple
# 命名元组
# stu = ('木森',18,'python自动化')

student = namedtuple('Students',('name','age','skill')) #里面的属性名必须为str类型

stu = student('木森',18,'python自动化')
print(type(stu))
print(isinstance(stu,tuple))
print(stu.name)